// This file contains some of the features of c++11 that can be used
#include <vector>
#include <algorithm>

class BaseClass
{
public:

	// function that can be overrided
	virtual int overridableFunction()
	{

	}
};

class DerivedClassWithOverrideFunction : public BaseClass
{
public:

	// override function
	int overridableFunction() override
	{

	}
};

class DerivedClassWithFinalFunctionThatcannotBeOverriden : public DerivedClassWithOverrideFunction
{
public:

	// any class inherit from this class cannot override this fucntion
	int overridableFunction() final
	{

	}
};

/*
class TestClass : public DerivedClassWithFinalFunctionThatcannotBeOverriden
{
public:
	int overridableFunction() override	// compile error
	{

	}
};
*/

// using strongly typed enum
enum class StongType : int {ENUM1, ENUM2, ENUM3 };

// using lamdas
void testLambda(const std::vector<int>& vec)
{
	auto pos = std::find_if(vec.begin(), vec.end(), [](int n) {return (n % 2 == 0); });
}

void reportAssertionFailure(const char* exprStr, const char* file, int line)
{

}

int main()
{
	// use auto to infer variable type 
	auto f = 1.0f;	// float value
	auto ms = 5;	// int value
	
	// use nullptr instead of NULL
	int* pNull = nullptr;

	// using foreach like
	std::vector<int> intVector;
	for (const auto& entry : intVector)
	{
		// use entry
	}

	StongType t = StongType::ENUM2;
}